<!DOCTYPE HTML>
<html>
<head>
     <meta charset="utf-8">
     
     <script type="text/javascript" src="../../output/js/jquery.js"></script>
     <link rel="stylesheet" href="../../output/css/general.css">
     <script type="text/javascript" src="../../output/js/general.js"></script>
     <script type="text/javascript">
     $(document).ready(function(){
          $("div .crud").hide();
         
         $("#add_student").click(function(){
             $("div .crud").hide();
             $("div#add_student").show("slow");
         });
          $("#delete_student").click(function(){
              $("div .crud").hide();
             $("div#delete_student").show("slow");
         });
          $("#update_student").click(function(){
              $("div .crud").hide();
             $("div#update_student").show("slow");
         });
         
     });
      </script>

</head>
<body>
<div>
    <p>hello <?php echo $user_name?></p>
</div>
    <div>
        <a href="http://localhost/wse/index.php/user/logout">logout</a>
    </div>
    
    <div>
    <button id="add_student">add student</button>
    <button id="delete_student">delete student</button>
    <button id="update_student">update student</button>
    </div>
    
    <div class="crud">
        <div id="add_student" class="crud">
            <form action="http://localhost/wse/index.php/user/add_new_student" method="post">
                <p>name: <input type="text" name="student_name" /></p>
                <p>nick_name: <input type="text" name="nick_name" /></p>
                <p>password: <input type="password" name="password" /></p>
                <p>sex: male<input type="radio"  checked='checked' name="sex" value="1" />female<input type="radio" name="sex" value="0" /></p>
                <p>birthday:<select id="sYear" size="1" onChange="createSelect()" name='year'></select> 
                            <select id="sMonth" size="1" onChange="createSelect()" name='month'></select> 
                            <select id="sDay" size="1" name='day'></select> 
                </p>
                <p>phone_number: <input type="text" name="phone_number" /></p>
                <p>email: <input type="text" name="email" /></p>
                <input type="submit" value="submit" name="submit"/>
            </form>
        </div>
        
        
        <div id="delete_student" class="crud">
                 <form action="http://localhost/wse/index.php/user/delete_student" method="get">
                     <p>id: </p><input type="text" name="student_id" />
                 <input type="submit" value="submit" name="submit"/>
                 </form>
        </div>
        <div id="update_student" class="crud">
            <form action="http://localhost/wse/index.php/user/update_student" method="post">
                <p>student_id: <input type="text" name="student_id" /></p>
                <p>phone_number: <input type="text" name="phone_number" /></p>
                <p>email: <input type="text" name="email" /></p>
                <input type="submit" value="submit" name="submit"/>
            </form>
          </div>
        
            
        
            
    </div>
</body>
<script type="text/javascript">createSelect(1);</script>
</html>
